<template>
  <div id="Buy">
    <ul>
      <li>
        <img :src="data.img" alt="" srcset="">
      </li>
      <li>{{data.title}}</li>
    </ul>

  </div>
</template>

<script>
import { Toast } from 'mint-ui'

export default {
  name: 'Buy',
  data () {
    return {
      data: ''
    }
  },
  mounted () {
    this.getdata()
  },
  methods: {
    getdata () {
      this.data = JSON.parse(localStorage.getItem('buy'))
      setTimeout(function () {
        Toast({
          message: '好看不',
          duration: 3000
        })
      }, 2000)
      setTimeout(function () {
        Toast({
          message: '多看两眼',
          duration: 3000
        })
      }, 5000)
      setTimeout(function () {
        Toast({
          message: '反正你也买不起',
          duration: 3000
        })
      }, 8000)
      setTimeout(function () {
        Toast({
          message: '对了',
          duration: 3000
        })
      }, 11000)
      setTimeout(function () {
        Toast({
          message: '你有两个肾',
          duration: 3000
        })
      }, 14000)
    }
  }
}
</script>

<style scoped lang="less">
#Buy {
  padding: 150px 0;
  font-size: 36px; /*px*/
  font-weight: 700;
  background: rgba(255, 255, 255, 1);
  text-align: center;
  width: 100%;
  margin: 0 auto;
  img {
    width: 70%;
  }
}
</style>
